<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>center</title>

<style type="text/css">

.p{ position:relative; float:left; left:50%; }

.c{ position:relative; float:left; right:50%; border:1px solid #f00; }


.p1{ position:relative; }

.c1{ position:absolute; width:500px; height:300px; top:50%; left:50%; margin:-150px 0 0 -250px; background:#000;}

</style>

</head>

<body>

<div>

<div>cccccccc</div>

</div>

<div>

<div>c1c1c1c1c1c1</div>

</div>

</body>

</html>
